package com.dragon.logical.service.contract;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dragon.repository.entity.AddPageData;
import com.dragon.repository.entity.Refund;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 退款表 服务类
 * </p>
 *
 * @author sy
 * @since 2024-01-09
 */
public interface IRefundService extends IService<Refund> {

    Page<Refund> selectPageList(String contractCode, String customerName, String startTime, String endTime, Integer status, Integer page, Integer limit);

    @Transactional(rollbackFor = RuntimeException.class)
    AddPageData addRefund(Refund refund);

    @Transactional(rollbackFor = RuntimeException.class)
    void updateRefund(Refund refund);

    void updateStatus(Integer id, Integer status);

    @Transactional(rollbackFor = RuntimeException.class)
    void auditStatus(Integer id, Integer status);

    Refund selectDetailById(Integer id);
}
